package com.ruoyi.system.controller;


import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.domain.DataProductionServiceDto;
import com.ruoyi.system.service.IDataProductionServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/productionService")
public class ProductionServiceController {

    @Autowired
    private IDataProductionServiceService iDataProductionServiceService;

    @GetMapping(value = "/getInfo")
    public AjaxResult getInfo(){

        List<DataProductionServiceDto> dataProductionServiceDto = new ArrayList<>();

        dataProductionServiceDto = iDataProductionServiceService.selectAllDataProductionServiceDto();

        if (dataProductionServiceDto == null)
            return AjaxResult.error("结果返回为空");

        return AjaxResult.success(dataProductionServiceDto);

    }
}
